#!/usr/bin/python

import cgi
from nspot import *
import cgitb; cgitb.enable()
from nspot import SystemProperties

sp = SystemProperties()

print "Content-type: text/html\n\n"

print "<head>"

if sp.get_system_mode() == 'pass':
    print '<meta http-equiv="refresh" content="0; URL=http://'+sp.get_ip_internal()+'/cgi-bin/pass_login_action">'
else:
    print '<meta http-equiv="refresh" content="0; URL=http://'+sp.get_ip_internal()+'/cgi-bin/login_page">'

print "<head>"
